home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-09-28 | 6.6 KB | 307 lines | [TEXT/MMCC] |
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- 68K C/C++
- Compiler release notes:
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
- Metrowerks 68K C/C++ Compiler release notes
- ===========================================
-
- Version: CW4+
- Date: September 1, 1994
- Author: Andreas Hommel
-
- New features/fixes since DR/4:
-
- - Support for C++ templates (see notes in "MWC++ limitations")
-
- - C++, 68k codegen and preprocessor fixes
-
- - Improved floating point code generation
-
- - Improved C++ default function handling
-
- - New #pragmas:
-
- "#pragma ANSI_strict (on|off")" on: enforce ANSI; off: relaxed ANSI
- standard on (ANSI C only ):
- - disallow new style '//' comments
- - disallow non-'int' bitfields
- - disallow unnamed arguments in function definitions "void f(int ) {}"
-
- on (ANSI C or C++):
- - disallow empty array struct members
- - disallow '#' tokens in a macro definitions that are not followed by a
- parameter
- - disallow identifier token after #endif
-
- "#pragma warning_errors (on|off")" on: treat all warnings as errors
-
-
- Bug Reports
- ```````````
-
- Please send in your bug reports using the Applelink/Internet BugReport
- stored in the release notes folder. Send reports to:
-
- -------------------------------------------------------------------------
- Andreas Hommel
- CodeWarrior C/C++ 68K Product Architect
- Metrowerks, Inc.
-
- Applelink: SUPPORTWERKS
- Internet: support@metrowerks.com
-
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- MWC++ limitations:
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
- o Precompiled headers
-
- MWC++ can now dump C++ specific data (including classes, inlines, etc.)
- into precompiled header files. However there are some restrictions:
-
- - Access declarations cannot be exported.
-
- - No declarations that actually define data (except const
- int/enum/float/pointer decls)
- or functions (except non-virtual inline functions) can be exported.
-
- - Including C++ generated headers in ANSI C sources is undefined and
- should
- be avoided (especially if there are inline functions in the precompiled
- header).
-
- ------------
-
- o ARM 5.3.1: Increment Decrement
-
- Prefix ++ and -- expressions are no lvalues.
-
-
- ------------
-
- o ARM 5.3.3: New
-
- MWC++ does not yet support the post ARM new[] extension
-
- void* operator new[](size_t); // <<< not yet accepted
-
- ------------
-
- o ARM 5.3.4: Delete
-
- MWC++ does not yet support the post ARM delete[] extension
-
- void operator delete[](void *);// <<< not yet accepted
-
- ------------
-
- o ARM 5.16:Conditional Operator
-
- Reference conversions are not applied to the 2nd and 3rd expression of the
- conditional operator.
-
- class base { };
- class derived : public base { };
-
- static void foo(deri i)
- {
- base& a=i;
- derived&b=i;
-
- sizeof( 0 ? a : b );// <<< illegal: a not converted to (Base&)b }
-
- ------------
-
- o ARM 5.17:Assignment Operators
-
- The result of an assignment is not an lvalue.
-
- int a;
-
- (a=1)++; // illegal: (a=1) is no lvalue
-
- ------------
-
- o ARM 7.1.2: Function Specifiers
-
- virtual must be the first token in a declartion.
-
- class foo {
- virtual int f();// ok
- int virtual f();// <<< not accepted
- };
-
- ------------
-
- o ARM 8.2.6: Default Arguments
-
- default parameters in member functions are not bound at the end of a class
- declaration.
-
- class foo {
- enum A { AA };
- int f(A a = AA);// ok
- int f(B b = BB);// <<< not accepted (BB is not yet declared) enum B { BB };
- };
-
- ------------
-
- o ARM 9.7: Nested scopes
-
- A friend function defined within a class is not in the scope of that
- class.
-
- struct foo
- {
- static int i;
- friend int foofunc()
- {
- return i; // <<< i not in scope
- }
- };
-
- ------------
-
- o ARM 9.8: Local Class Declarations with inline functions
-
- MWC++ cannot access local types or variables from within a function-nested
- class inline function declaration (all inline functions are inserted on
- global scope level):
-
- void foo()
- {
- static int s;
- enum E { AA; };
-
- class local {
- int f1() { return s; } // <<< cannot access 's' int f2() { return
- local::f1(); }// <<< cannot access 'local' int f3() { return int(AA); }//
- <<< cannot access 'AA' };
- }
-
- ------------
-
- o ARM 11.4:Friends
-
- friend must be the first token in a declaration.
-
- class foo {
- friend int f1();// ok
- int friend f2();// <<< not accepted
- };
-
- ------------
-
- o ARM 12.1:Constructors
-
- MWC++ does not generate a copy constructor for "simple classes".
-
- A "simple class" is a class that:
- - is only derived from simple classes or not derived - does not have any
- non-simple class members - does not have any virtual member functions -
- does not have any virtual base classes - does not have any
- constructor/destructor
-
- class foo { int f; };
-
- void foof(foo fa)
- {
- foo lf1=foo(fa);// <<< error explicit copy constructor call; no default
- cop constructor generated
- foo lf1=fb; // ok: (bitwise copy)
- }
-
- ------------
-
- o ARM 12.4:Destructors
-
- MWC++ cannot explicitly destroy non-class types
-
- typedef long T; T *p; p->T::~T(); // <<< cannot destroy
-
- ------------
-
- o ARM 12.8:Copying class objects
-
- MWC++ does not generate a default operator= for "simple classes" (see 12.1
- above).
-
- MWC++ does not enforce the rule that objects representing virtual base
- classes will
- be assign only once by a generated assigment operator.
-
- MWC++ does enforce the rule that objects representing virtual base classes
- will be initalized only once by a generated copy constructor.
-
- ------------
-
- o ARM 14: Templates
-
- Instantiation:
-
- The current implementation of MWC++ templates requires that the definition
- of a function template has been parsed before the end of the translation
- unit if a function needs to be instantiated from that template.
-
- Features that are not yet supported (or do not yet work under all
- circumstances):
-
- - template friend classes
-
- template<class T> class X { ...
- template<class T> class Y {
- friend class X<T>; // <<< not accepted
-
-
- - forward pointer references to undefined class templates
-
- template<class T> class X;
- X<int> *ip; // <<< not accepted
-
-
- - template access declarations
-
- template<class T> class X { int i; ...
- template<class T> class Y : X<T> {
- X<T>::i;// <<< not accepted
-
- - class template specializations
-
- template<class T> class X { ...
- class X<char> { ... // <<< not accepted
-
- - non-type template parameters in member function templates
-
- template<int I> class X { void f(); };
- template<int I> void X<I>::f() { ... } // <<< not accepted
-
- - friend function templates
-
- template<class T> class X {
- friend void f();
- };
- template<class T> void f() { ... } // <<< not used to generate friend
-
- - static class member templates (not accepted)
-
- template<class T> class X {
- static T st;
- };
- template<class T> T X<T>::st = 1; // <<< not accepted
-
- ------------
-
- o ARM 15: Exception Handling
-
- not yet supported
-
- ------------
-
- o ARM ??: RTTI
-
- not yet supported
-
- ------------
-
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%